<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/9/30
 * Time: 14:26
 */

include_once 'redis.php';

//获取请求数据
$param = $_POST;

$url = "edit.php?uid={$param['uid']}";//跳转url

if (empty($param['uid'])) {
    notice('缺少uid参数');
} else {
    //修改数据
    $ret = $redis->hMset("user:{$param['uid']}", ['uid' => $param['uid'], 'name' => $param['name'], 'phone' => $param['phone'], 'age' => $param['age']]);

    if ($ret) {
        notice('修改成功');
    } else {
        notice('修改失败');
    }
}
?>